Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix parse_xml type for tmpl #590

Merged
merged 3 commits into from
Oct 17, 2023
Merged

Conversation

GMoustacky
Copy link
Contributor

SUMMARY

Change the parse_xml argument validation to require a type str instead of a type string for tmpl.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

parse_xml

ADDITIONAL INFORMATION

Any simple call to parse_xml would render a flavour of the following error message:

fatal: [localhost]: FAILED! => {"msg": "[\"argument 'tmpl' is of type <class 'ansible.utils.native_jinja.NativeJinjaText'> and we were unable to convert to string: 'NoneType' object is not callable\"]"}

@GMoustacky GMoustacky temporarily deployed to ack September 28, 2023 04:09 — with GitHub Actions Inactive
@softwarefactory-project-zuul
Copy link
Contributor

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/d958d1287d0f4cbbb6a1b703b2a42f57

ansible-test-network-integration-junos-vsrx-netconf-python36-stable29 RETRY_LIMIT in 6m 35s (non-voting)
✔️ ansible-test-network-integration-junos-vsrx-netconf-python36-stable211 SUCCESS in 1h 15m 36s
✔️ ansible-test-network-integration-junos-vsrx-netconf-python39-stable212 SUCCESS in 1h 01m 46s
ansible-test-network-integration-junos-vsrx-netconf-python39 RETRY_LIMIT in 1m 33s
ansible-test-network-integration-junos-vsrx-network_cli-python36-stable29 RETRY_LIMIT in 5m 50s (non-voting)
ansible-test-network-integration-junos-vsrx-network_cli-python36-stable211 RETRY_LIMIT in 8m 54s
✔️ ansible-test-network-integration-junos-vsrx-network_cli-python39-stable212 SUCCESS in 14m 59s
ansible-test-network-integration-junos-vsrx-network_cli-python39 RETRY_LIMIT in 5m 49s
ansible-test-network-integration-junos-vsrx-network_cli-libssh-python36-stable29 FAILURE in 14m 53s (non-voting)
ansible-test-network-integration-junos-vsrx-network_cli-libssh-python36-stable211 FAILURE in 13m 49s
ansible-test-network-integration-junos-vsrx-network_cli-libssh-python39-stable212 FAILURE in 25m 59s
ansible-test-network-integration-junos-vsrx-network_cli-libssh-python39 RETRY_LIMIT in 6m 15s
✔️ ansible-test-network-integration-nxos-cli-python39-scenario01 SUCCESS in 29m 55s (non-voting)
✔️ ansible-test-network-integration-nxos-cli-python39-scenario02 SUCCESS in 32m 51s (non-voting)
ansible-test-network-integration-nxos-cli-python39-scenario03 FAILURE in 35m 49s (non-voting)
✔️ ansible-test-network-integration-nxos-cli-python39-scenario04 SUCCESS in 28m 27s (non-voting)
ansible-test-network-integration-eos-network_cli-python39 RETRY_LIMIT in 58s (non-voting)
ansible-test-network-integration-eos-httpapi-python39 RETRY_LIMIT in 5m 27s (non-voting)
ansible-test-network-integration-eos-network_cli-libssh-python39 RETRY_LIMIT in 5m 59s (non-voting)
ansible-ee-integration-ios-latest FAILURE in 12m 39s (non-voting)
ansible-ee-integration-ios-stable-2.9 FAILURE in 21m 37s (non-voting)
ansible-ee-integration-ios-stable-2.11 FAILURE in 21m 22s (non-voting)
ansible-ee-integration-ios-stable-2.12 FAILURE in 21m 38s (non-voting)
ansible-ee-integration-ios-libssh-latest FAILURE in 21m 42s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.9 FAILURE in 21m 45s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.11 FAILURE in 14m 48s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.12 FAILURE in 14m 37s (non-voting)
ansible-test-network-integration-vyos-paramiko-python39-devel NODE_FAILURE Node request 200-0006435977 failed in 0s
ansible-test-network-integration-vyos-paramiko-python39-stable214 NODE_FAILURE Node request 200-0006435978 failed in 0s
ansible-test-network-integration-vyos-paramiko-python39-stable213 NODE_FAILURE Node request 200-0006435979 failed in 0s
ansible-test-network-integration-vyos-paramiko-python39-stable212 NODE_FAILURE Node request 200-0006435980 failed in 0s
ansible-test-network-integration-vyos-paramiko-python36-stable29 NODE_FAILURE Node request 200-0006435981 failed in 0s (non-voting)
ansible-test-network-integration-vyos-libssh-python39-devel NODE_FAILURE Node request 200-0006435982 failed in 0s
ansible-test-network-integration-vyos-libssh-python39-stable214 NODE_FAILURE Node request 200-0006435983 failed in 0s
ansible-test-network-integration-vyos-libssh-python39-stable213 NODE_FAILURE Node request 200-0006435984 failed in 0s
ansible-test-network-integration-vyos-libssh-python39-stable212 NODE_FAILURE Node request 200-0006435985 failed in 0s
ansible-test-network-integration-vyos-libssh-python36-stable29 NODE_FAILURE Node request 200-0006435986 failed in 0s
✔️ build-ansible-collection SUCCESS in 14m 33s
ansible-test-network-integration-ansible-netcommon-junos-vsrx-netconf-python39 RETRY_LIMIT in 6m 02s
✔️ ansible-tox-linters SUCCESS in 10m 27s
✔️ ansible-galaxy-importer SUCCESS in 5m 21s

@GMoustacky GMoustacky temporarily deployed to ack September 28, 2023 09:55 — with GitHub Actions Inactive
@GMoustacky
Copy link
Contributor Author

To add some context, this happens because filters use AnsibleArgSpecValidatorthat is applied on DOCUMENTATION which enforces the type. It's not used in other places like connection, so the typo in other folders is not triggering an error.

@softwarefactory-project-zuul
Copy link
Contributor

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/da542e2cecde4ee7925b78207f4f685a

ansible-test-network-integration-junos-vsrx-netconf-python36-stable29 FAILURE in 13m 36s (non-voting)
✔️ ansible-test-network-integration-junos-vsrx-netconf-python36-stable211 SUCCESS in 1h 17m 03s
✔️ ansible-test-network-integration-junos-vsrx-netconf-python39-stable212 SUCCESS in 1h 04m 17s
ansible-test-network-integration-junos-vsrx-netconf-python39 RETRY_LIMIT in 8m 03s
ansible-test-network-integration-junos-vsrx-network_cli-python36-stable29 FAILURE in 11m 54s (non-voting)
ansible-test-network-integration-junos-vsrx-network_cli-python36-stable211 RETRY_LIMIT in 5m 23s
✔️ ansible-test-network-integration-junos-vsrx-network_cli-python39-stable212 SUCCESS in 17m 03s
ansible-test-network-integration-junos-vsrx-network_cli-python39 RETRY_LIMIT in 7m 35s
ansible-test-network-integration-junos-vsrx-network_cli-libssh-python36-stable29 FAILURE in 16m 40s (non-voting)
ansible-test-network-integration-junos-vsrx-network_cli-libssh-python36-stable211 FAILURE in 15m 24s
✔️ ansible-test-network-integration-junos-vsrx-network_cli-libssh-python39-stable212 SUCCESS in 15m 54s
ansible-test-network-integration-junos-vsrx-network_cli-libssh-python39 RETRY_LIMIT in 8m 10s
✔️ ansible-test-network-integration-nxos-cli-python39-scenario01 SUCCESS in 30m 42s (non-voting)
✔️ ansible-test-network-integration-nxos-cli-python39-scenario02 SUCCESS in 28m 23s (non-voting)
ansible-test-network-integration-nxos-cli-python39-scenario03 FAILURE in 36m 09s (non-voting)
✔️ ansible-test-network-integration-nxos-cli-python39-scenario04 SUCCESS in 27m 40s (non-voting)
ansible-test-network-integration-eos-network_cli-python39 RETRY_LIMIT in 4m 26s (non-voting)
ansible-test-network-integration-eos-httpapi-python39 RETRY_LIMIT in 2m 59s (non-voting)
ansible-test-network-integration-eos-network_cli-libssh-python39 RETRY_LIMIT in 4m 01s (non-voting)
ansible-ee-integration-ios-latest FAILURE in 14m 04s (non-voting)
ansible-ee-integration-ios-stable-2.9 FAILURE in 14m 16s (non-voting)
ansible-ee-integration-ios-stable-2.11 FAILURE in 14m 09s (non-voting)
ansible-ee-integration-ios-stable-2.12 FAILURE in 15m 16s (non-voting)
ansible-ee-integration-ios-libssh-latest FAILURE in 12m 44s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.9 FAILURE in 15m 15s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.11 FAILURE in 15m 09s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.12 FAILURE in 15m 17s (non-voting)
ansible-test-network-integration-vyos-paramiko-python39-devel NODE_FAILURE Node request 200-0006436811 failed in 0s
ansible-test-network-integration-vyos-paramiko-python39-stable214 NODE_FAILURE Node request 200-0006436812 failed in 0s
ansible-test-network-integration-vyos-paramiko-python39-stable213 NODE_FAILURE Node request 200-0006436813 failed in 0s
ansible-test-network-integration-vyos-paramiko-python39-stable212 NODE_FAILURE Node request 200-0006436814 failed in 0s
ansible-test-network-integration-vyos-paramiko-python36-stable29 NODE_FAILURE Node request 200-0006436815 failed in 0s (non-voting)
ansible-test-network-integration-vyos-libssh-python39-devel NODE_FAILURE Node request 200-0006436816 failed in 0s
ansible-test-network-integration-vyos-libssh-python39-stable214 NODE_FAILURE Node request 200-0006436817 failed in 0s
ansible-test-network-integration-vyos-libssh-python39-stable213 NODE_FAILURE Node request 200-0006436818 failed in 0s
ansible-test-network-integration-vyos-libssh-python39-stable212 NODE_FAILURE Node request 200-0006436819 failed in 0s
ansible-test-network-integration-vyos-libssh-python36-stable29 NODE_FAILURE Node request 200-0006436820 failed in 0s
✔️ build-ansible-collection SUCCESS in 14m 18s
ansible-test-network-integration-ansible-netcommon-junos-vsrx-netconf-python39 RETRY_LIMIT in 7m 16s
✔️ ansible-tox-linters SUCCESS in 10m 20s
✔️ ansible-galaxy-importer SUCCESS in 4m 52s

@isdrk
Copy link

isdrk commented Oct 17, 2023

I have the same issue after upgrading Ansible up to 8.5.0
msg: ["argument 'tmpl' is of type <class 'str'> and we were unable to convert to string: 'NoneType' object is not callable"]

@KB-perByte KB-perByte temporarily deployed to ack October 17, 2023 12:30 — with GitHub Actions Inactive
@KB-perByte KB-perByte temporarily deployed to ack October 17, 2023 12:30 — with GitHub Actions Inactive
@KB-perByte KB-perByte merged commit 6099fe5 into ansible-collections:main Oct 17, 2023
49 of 50 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants